//导入service对象
import service from "../utiles/request/index";

//管理系统登录
export function user_login(payload = {}) {
    return service.post('/login',  payload )
}

// 用户管理
// 用户列表
export function system_list(payload = {}) {
    return service.get('/system/user_list', { params: payload })
}
// 用户添加
export function system_add(payload = {}) {
    return service.post('/system/user_add', payload)
}
// 删除用户
export function system_delete(payload: any = {}) {
    return service.post('/system/user_delete/' + payload.id, payload)
}
// 修改用户
export function system_edit(payload: any = {}) {
    return service.post('/system/user_edit', payload)
}

// 角色管理
export function system_role_list(payload = {}) {
    return service.get('/system/role_list', { params: payload })
}
// 角色添加
export function system_role_add(payload = {}) {
    return service.post('/system/role_add', payload)
}
// 删除角色
export function system_role_delete(payload: any = {}) {
    return service.post('/system/role_delete/' + payload.id, payload)
}
// 修改角色
export function system_role_edit(payload: any = {}) {
    return service.post('/system/role_edit', payload)
}

// 个人中心
export function system_personals_list(payload: any = {}) {
    return service.get('/system/user_list', { params: payload })
}
// 修改个人信息
export function system_personals_edit(payload: any = {}) {
    return service.post('/system/user_edit', payload)
}